<?php

namespace common\models\projectmoney;

use Yii;

/**
 * This is the model class for table "project_money".
 *
 * @property integer $id
 * @property string $name
 * @property string $initial_cash
 * @property string $total_expenditure
 * @property string $residual_cash
 * @property integer $pr_id
 */
class ProjectMoney extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'project_money';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'initial_cash', 'total_expenditure', 'residual_cash', 'pr_id'], 'required'],
            [['initial_cash', 'total_expenditure', 'residual_cash'], 'number'],
            [['pr_id'], 'integer'],
            [['name'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'name' => Yii::t('app', 'Name'),
            'initial_cash' => Yii::t('app', 'Initial Cash'),
            'total_expenditure' => Yii::t('app', 'Total Expenditure'),
            'residual_cash' => Yii::t('app', 'Residual Cash'),
            'pr_id' => Yii::t('app', 'Pr ID'),
        ];
    }
}
